/* 
* File:   Logger.h
* Author: Ben
*
* Created on April 29, 2013, 5:35 PM
*/

#ifndef LOGGER_H
#define	LOGGER_H

#include <ostream>
#include "ILoggable.h"

namespace logger {

	class Logger {
	public:
		Logger();
		Logger(const Logger& orig);
		virtual ~Logger();
		static void setLogger(Logger &logger);
		virtual void log(const ILoggable &msg) const = 0;
		void log(std::wstring &msg);
		static Logger& getLogger();

	private:
		static Logger *instance;
		static class Info : public ILoggable{
		public:
			Info(std::wstring *message);
			Info(const Info &orig);
			virtual ~Info();
			void log(std::wostream &stream) const;
			int getLevel() const;
		private:
			std::wstring *mMessage;
		};
	};

	void log(const ILoggable &msg);
}
#endif	/* LOGGER_H */

